import request from '@/utils/request'

export const getDepartMentAPI = () => {
  return request({ url: '/company/department' })
}

export const getMangerAPI = () => {
  return request({ url: '/sys/user/simple' })
}
export const addDapAPI = (data) => {
  return request({ url: '/company/department', method: 'post', data })
}

// 1、封装编辑详情API
export const getDetailAPI = (id) => {
  return request({ url: '/company/department/' + id })
}

// 封装更新API
export const updateDepAPI = (data) => {
  return request({ url: '/company/department/' + data.id, method: 'put', data })
}

export const delDepAPI = (id) => {
  return request({ url: '/company/department/' + id, method: 'delete' })
}
